﻿<%@page language="java" contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<script>
	$(function(){
	
	});
</script>


<div class="panel-box">
	<div class="titlebar" id="headerPanel">แก้ไขเมนู</div>
	<div class="panel-body">
		<div style="width: 700px">
			<form class="form-horizontal" action="${pageContext.request.contextPath}/backend/menu/reset" 
					onsubmit="return validate();" method="post">
				<c:forEach items="${menus}" var="x">
				    <div class="form-group">
						<label class="col-sm-6 control-label" for="status">${x.nameTh}</label>
	    				<div class="col-sm-2">
						<c:choose>
							<c:when test="${x.isActive eq 'Y'}">
								<input type="checkbox" id="${x.id}" name="${x.id}" checked="checked">
							</c:when>
							<c:otherwise>
								<input type="checkbox" id="${x.id}" name="${x.id}">
							</c:otherwise>
						</c:choose>
						</div>
					</div>
				</c:forEach>
			
				<div style="margin-top: 10px;">
					<button class="btn btn-primary" type="submit" id="submit" name="submit">ตกลง</button>
					<button class="btn btn-default" type="button" id="btnCancel" name="btnCancel">ล้างข้อมูล</button>
				</div>
			</form>
		</div>
	</div>
</div>
